Skip to main content

All Questions

1vote
1answer
220views

How can I pipe an alias that requires sudo through SSH?

I've set up so that I can SSH securely into my home PC from my laptop. Today, I tried running an update just to test, but I couldn't do it from the laptop. What I basically wanted to do, was to pass ...
telometto's user avatar
3votes
1answer
22kviews

ssh to server and switch user and change a directory [duplicate]

I Need to ssh to a server then switch user and change the directory and then run a command. Now am doing ssh -t username@hostname "sudo su - otheruser && cd /path/to/directory && ...
kuldeep's user avatar
2votes
1answer
2kviews

Submit password with sudo and execute script with nohup

I would like to download and run a script in the background so the task is independent of the shell and its exit. Moreover this script should be run as sudo, using: echo MY_PWD | sudo -u MY_USER -S .....
user3191334's user avatar

close